/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 登录容器样式 */
.login-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    margin: 0 0 20px;
    color: #333;
}

/* 表单切换按钮样式 */
.switch-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.switch-btn {
    padding: 8px 20px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.switch-btn.active {
    background-color: #667eea;
    color: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 验证码容器样式 */
.captcha-container {
    display: flex;
    gap: 10px;
}

.captcha-container input {
    width: 150px;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.captcha-image-container img {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.refresh-btn {
    padding: 8px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    color: #667eea;
    transform: rotate(180deg);
}

/* 提交按钮样式 */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #5a6fd6;
}

button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 论坛样式 */
.forum-monitor {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.forum-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.forum-btn:hover {
    transform: scale(1.1);
}

.forum-btn.active {
    transform: scale(0.9);
}

.forum-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.forum-container {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.forum-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.forum-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.forum-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #667eea;
    color: white;
}

.forum-close-btn {
    font-size: 24px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
}

.comment-input-area {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#commentContent {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#commentContent:focus {
    outline: none;
    border-color: #667eea;
}

#submitComment {
    padding: 8px 20px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
}

.comments-container {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.comment-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-header {
    margin-bottom: 10px;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.comment-content {
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}

.comment-footer {
    display: flex;
    justify-content: flex-end;
}

.like-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.like-btn.liked {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 热门评论样式 */
.hot-comments-ranking {
    padding: 20px;
    overflow-y: auto;
}

.hot-comments-ranking h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    position: relative;
}

.hot-comments-ranking h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.ranking-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ranking-item:hover::before {
    opacity: 1;
}

.ranking-number {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-content {
    flex-grow: 1;
}

.ranking-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.ranking-username {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    margin-right: 10px;
}

.ranking-time {
    color: #999;
    font-size: 12px;
}

.ranking-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ranking-text.expanded {
    -webkit-line-clamp: unset;
}

.ranking-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-likes {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    font-weight: 500;
}

.ranking-likes i {
    font-size: 16px;
}

.expand-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.expand-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.expand-btn.expanded i {
    transform: rotate(180deg);
}

/* 热门评论展开动画 */
@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-text.expanding {
    animation: expandIn 0.3s ease forwards;
}

/* 用户名标签样式 */
.username-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.username-badge span {
    color: #666;
    font-size: 14px;
}

.username-badge .current-username {
    color: #667eea;
    font-weight: bold;
}

.regenerate-username {
    padding: 5px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.regenerate-username:hover {
    color: #667eea;
    transform: rotate(180deg);
}

/* 评论用户名样式 */
.comment-username {
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
    margin-right: 10px;
}

/* 分页控制样式 */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
}

.page-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-control label {
    color: #666;
    font-size: 14px;
}

#commentsPerPage {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

#commentsPerPage:focus {
    outline: none;
    border-color: #667eea;
}

/* 自定义页面大小控件样式 */
.custom-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

#customPageSize {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#customPageSize:focus {
    outline: none;
    border-color: #667eea;
}

#applyCustomPageSize {
    padding: 5px 10px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#applyCustomPageSize:hover {
    background-color: #5a6fd6;
}

#applyCustomPageSize:active {
    background-color: #4c5ec2;
}

/* 天气监控按钮样式 */
.weather-monitor {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
}

.weather-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.weather-btn:hover {
    transform: scale(1.1);
}

.weather-btn.active {
    transform: scale(0.9);
}

/* 内存监控按钮样式 */
.memory-monitor {
    position: fixed;
    bottom: 160px;
    right: 20px;
    z-index: 1000;
}

.monitor-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.monitor-btn:hover {
    transform: scale(1.1);
}

.monitor-btn.active {
    transform: scale(0.9);
}

/* 图表容器样式 */
.weather-chart-container,
.memory-chart-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    display: none;
    width: 90%;
    max-width: 1000px;
    z-index: 1002;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.chart-close {
    font-size: 24px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
}

.charts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-section {
    flex: 1;
}

.chart-section h3 {
    margin: 0 0 10px;
    color: #333;
}

/* PDF预览样式 */
.pdf-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1003;
}

.pdf-preview-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    height: 90%;
    max-width: 1200px;
}

.pdf-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
}

#pdfViewer {
    width: 100%;
    height: calc(100% - 40px);
    margin-top: 40px;
} 